
#import <UIKit/UIKit.h>

#import "cocos2d.h"
#import "GameConfig.h"
#import "RootViewController.h"
#import "HomePage.h"

#import "Bottle_Menu.h"
#import "Bottle_Game.h"
#import "Bottle_PlayerSelected.h"
#import "Bottle_Des.h"
#import "Bottle_GameResult.h"

#import "Card_Menu.h"
#import "Card_PlayerSelected.h"
#import "Card_Game.h"
#import "Card_GameResult.h"
#import "Card_Des.h"

typedef enum 
{
	StateNone,
	StateHomePage,
	StateControls
}AppState;

@interface AppController : NSObject 
	<
	UIApplicationDelegate,
	//UIScrollViewDelegate,
	UITextFieldDelegate,
	HomePageDelegate,
	
	Bottle_GameDelegate,
	Bottle_DesDelegate,
	Bottle_PlayerSelectedDelegate,
	Bottle_MenuDelegate,
	Bottle_GameResultDelegate,

	Card_MenuDelegate,
	Card_DesDelegate,
	Card_PlayerSelectedDelegate,
	Card_GameDelegate,
	Card_GameResultDelegate
	> 
{
	UIWindow	        *window;
	RootViewController	*viewController;
	
	CCSprite    *m_pBg;
	
	CCScene		*scene;
	CCLayer		*currentLayer;
	
	AppState     gameState;
	
	UIScrollView   * scrollView;
	UIButton       * rightArrow;
	UIButton       * leftArrow;
	
	NSMutableArray * textFieldArray;
	
	int nPlayerNum; //纸牌玩家人数
	
	int nBottle_PlayerNum; //转酒瓶玩家人数
	
	CGPoint oldContentOff;
}

@property (assign) int nPlayerNum;
@property (assign) int nBottle_PlayerNum;

@property (nonatomic,retain) UIWindow	    * window;
@property (nonatomic,retain) NSMutableArray * textFieldArray;
@property (nonatomic,retain) UIScrollView *scrollView;

-(void)initTextField;
-(void)setTextFieldArrayVisable:(BOOL)isHidden;

-(void)TurnToHomePage;
-(void)TurnToBottleMenu;
-(void)TurnToCardMenu;

-(void)AddTextField;
-(void)RemoveTextField;

//按钮点击声音
-(void)TipSound;

@end

